//create by huarong for check unique 2004/3
//unique1.c

#include <ansi.h>
#include <dbase.h>
//inherit F_CLEAN_UP;

int listing (object who, string prefix, string arg)
{
        object *ilist;
        int j;

        ilist = all_inventory(who);
        if (! ilist)
                return 0;
        j = sizeof(ilist);
        while (j--) {
                object ob = ilist[j];
                string *ids = ob->parse_command_id_list();
                if (member_array(arg, ids) == -1) {
                        continue;
                }
//                tell_object(find_player("huarong"),ob->query("id"));
                return 1;
        }
        return 0;
}

int check(string arg)
{
        object *ulist;
        int i,j=0;

        if (! arg)
                return 0;

        ulist = users();
        i = sizeof(ulist);
        while (i--) {
                if(listing (ulist[i], "  ", arg)==1)
                {
                j=1;
                }
        }
        return j;
}


